package org.smartopen.unionpay.admin.controller;

import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.smartframework.core.util.JsonUtil;
import org.smartframework.unionpay.constant.PayConstant;
import org.smartframework.unionpay.domain.SmartPayNotifyResult;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Api(tags = {"支付接口"})
@RestController
@Slf4j
public class UnionpayController {

    @RequestMapping("/openapi/notify")
    public String notify(@RequestBody SmartPayNotifyResult result) {
        log.info(JsonUtil.toJson(result));
        return PayConstant.RETURN_VALUE_SUCCESS;
    }

}
